package handler

import (
	"gin/global/model"
	classtype "gin/srv"
	"net/http"

	"github.com/gin-gonic/gin"
)

func ClassTypeFind(context *gin.Context) {
	find, err := model.ClassTypeConn.ClassTypeFind(model.Ctx, &classtype.ClassTypeFindRequest{})
	if err != nil {
		context.JSON(http.StatusOK, gin.H{"data": nil, "msg": err.Error()})
		return
	}
	context.JSON(http.StatusOK, gin.H{"data": find, "msg": "success"})
}
